/**
 * 公共基础请求模块
 */

import request from '@/utils/request'
import { ILoginResponse } from './types/common'

export const login = (data: {
  account: string,
  pwd: string,
  imgcode: string
}) => { // 用户登录请求
  return request<ILoginResponse>({
    method: 'POST',
    url: '/admin/login',
    data
  })
}

export const logout = () => { // 管理员退出
  return request<ILoginResponse>({
    method: 'GET',
    url: '/setting/admin/logout'
  })
}
